/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jps.datastore;

import java.util.Iterator;
import java.util.List;

/**
 *
 * @author calyja
 */
public class ComplexObject extends SBAObject {

    
//    public ComplexObject(Object o) {
//        for (Long key : SBAStore.parsedObjectMap.keySet()) {
//            if (SBAStore.parsedObjectMap.get(key).equals(o)) {
//                setOID(key);
//            } else {
//                setOID(SBAStore.generateOID());
//            }
//        }
//        SBAStore.objectMap.put(getOID(), this);        
//    }
//    
//    public ComplexObject() {
//        setOID(SBAStore.generateOID());
//        SBAStore.objectMap.put(getOID(), this);
//    }
    
    @Override
    public String toString() {
        String result = "<i" + getOID() + ", \"" + getName() + "\", {";
        Iterator it = getChildOIDs().iterator();
        while (it.hasNext()) {
            Long oid = (Long) it.next();
            result += "i" + oid + ",";
                    
        }
        result += "}> - Complex";
        result = result.replace(",}", "}");
        return result;
    }
    
    public List<Long> getChildOIDs() {
        return childOIDs;
    }

    public void setChildOIDs(List<Long> childOIDs) {
        this.childOIDs = childOIDs;
    }
    
    private List<Long> childOIDs;
}
